var ns;
var app = new Vue({
    el: '#app',
    data: {
        ID: 0,
        form: {},
        list: [],
        AddressDetailInfo: '',
        // list:[
        //     {"ID":51,"OrderID":153,"Title":"已完成","Content":"","ContactName":"刘道阳","ContactPhone":"11111111","CreateTime":"2022-08-22T09:07:43.25","Type":3,"CreateTimeDesc":"2022-08-22 09:07:43","IsNew":false,"IsDirty":false,"IsDeleted":false,"IsValid":true,"ValidationErrors":[],"JsonIgnoreFields":["SelectFieldList"],"IsSaveRequired":false}
        // ],     
    },
    methods: {
        get_data: function () {
            var that = this;
            ns.get({ action: 'getorderloginfo', OrderID: that.ID },
                function (succeed, data, err) {
                    if (succeed) {
                        if (data.status) {
                            that.list = data.data;
                        }
                    } else {
                        api.toast({
                            msg: err,
                            duration: 2000,
                            location: 'bottom'
                        });
                    }
                });
        },
        telPhone: function (telPhone) {
            if (!telPhone || telPhone == undefined) {
                api.toast({
                    msg: '电话号码为空',
                    duration: 2000,
                    location: 'bottom'
                });
                return;
            }
            api.call({
                type: 'tel_prompt',
                number: telPhone
            });
        },
        do_viewimages: function (imageUrls,activeIndex) {
            var that = this;
            var imageBrowser = api.require('imageBrowser');
            imageBrowser.openImages({
                showList: false,
                activeIndex: activeIndex,
                imageUrls: imageUrls
            });
        },
    }
});
apiready = function () {
    api.parseTapmode();
    ns = window.Foresight.Util;

    app.ID = api.pageParam.id;
    app.AddressDetailInfo = api.pageParam.AddressDetailInfo;
    app.get_data();
};

